package com.zjbd.douyangsystem.controller;

import com.zjbd.douyangsystem.service.IPayService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 支付接口
 */
@Slf4j
@RestController
@RequestMapping("/douyang/system/pay")
public class PayController {

    @Autowired
    private IPayService iPayService;

    @GetMapping("/topup")
    public String topup(){
        return "充值成功";
    }

    @GetMapping("/checkBalance")
    public String checkBalance(@RequestParam String userId){
        log.info("收到服务调用{}",userId);
        String s = iPayService.checkBalance(userId);
        return s;
    }
}
